﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Business.Migrations
{
    public partial class create_procurement : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "base_procurement",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    Carriers = table.Column<int>(type: "int", nullable: false),
                    Vendor = table.Column<int>(type: "int", nullable: false),
                    Appointmentrequesttime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Externaltrackingnumber = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Totalnumberofunits = table.Column<int>(type: "int", nullable: false),
                    Operator = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Inboundordernumber = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Inboundtime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Totalweightof = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Documentremarks = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Reservationnumber = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    Totalvolumeof = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Trackingnumber = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_base_procurement", x => x.Id);
                });

            migrationBuilder.CreateIndex(
                name: "IX_base_procurement_Appointmentrequesttime",
                table: "base_procurement",
                column: "Appointmentrequesttime");

            migrationBuilder.CreateIndex(
                name: "IX_base_procurement_Carriers",
                table: "base_procurement",
                column: "Carriers");

            migrationBuilder.CreateIndex(
                name: "IX_base_procurement_Externaltrackingnumber",
                table: "base_procurement",
                column: "Externaltrackingnumber");

            migrationBuilder.CreateIndex(
                name: "IX_base_procurement_Inboundordernumber",
                table: "base_procurement",
                column: "Inboundordernumber");

            migrationBuilder.CreateIndex(
                name: "IX_base_procurement_Inboundtime",
                table: "base_procurement",
                column: "Inboundtime");

            migrationBuilder.CreateIndex(
                name: "IX_base_procurement_Reservationnumber",
                table: "base_procurement",
                column: "Reservationnumber");

            migrationBuilder.CreateIndex(
                name: "IX_base_procurement_Trackingnumber",
                table: "base_procurement",
                column: "Trackingnumber");

            migrationBuilder.CreateIndex(
                name: "IX_base_procurement_Vendor",
                table: "base_procurement",
                column: "Vendor");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "base_procurement");
        }
    }
}
